import request from '@/utils/request'

/**
 * 行政区划查询
 * @param districeId
 * @returns {AxiosPromise<AxiosResponse<any>>}
 */
export function findAllocationById(districeId) {
  return request({
    url: '/system/allocation/findById/'+districeId,
    method: 'get',
  })
}
/**
 * 查询行政区划列表
 * @param data
 * @returns {*}
 */
export function districtList(data) {
  return request({
    url: '/system/allocation/list',
    method: 'post',
    data: data
  })
}

/**
 * 查询字典表下拉框列表
 * @param data
 * @returns {*}
 */
export function dictionaryList() {
  return request({
    url: '/system/allocation/dictionaryList',
    method: 'get',
  })
}

/**
 * 添加
 * @param data
 * @returns {*}
 */
export function add(data) {
  return request({
    url: '/system/allocation/add',
    method: 'post',
    data: data
  })
}

/**
 * 修改
 * @param data
 * @returns {*}
 */
export function edit(data) {
  return request({
    url: '/system/allocation/edit',
    method: 'post',
    data: data
  })
}

/**
 * 单删
 * @param districeId
 * @returns {*}
 */
export function remove(districeId) {
  return request({
    url: '/system/allocation/remove/'+districeId,
    method: 'delete',
  })
}

